#include "mainwindow.h"
#include "ui_mainwindow.h"
#include  <QListWidgetItem>
#include <menu.h>
#include<QMessageBox>
#include<QDebug>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);



    pMenu = new Menu();//构建一个界面，把当前类作为界面的参数
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    name = ui->LineEdit->text();
    password = ui->LineEdit_2->text();
    if(name=="tan"&&password=="123456")
    {
          pMenu->show();
        if(ui->holdPwd->checkState() == Qt::Checked)
        {
            qDebug()<<"你要记住密码";
        }
        if(ui->autoLogin->checkState() == Qt::Checked)
        {
            qDebug()<<"你要自动登录";
        }

        qDebug()<<"登录成功了";
        return;
    }
    qDebug()<<"登录失败了";

}

